Function ScintillaToString:String(c:Int = 0)
	Select c
		Case -1 
			Return "INVALID_POSITION"
		Case 2000
			Return "SCN_STYLENEEDED"
		Case 2001 
			Return "SCN_CHARADDED"
		Case 2002 
			Return "SCN_SAVEPOINTREACHED"
		Case 2003 
			Return "SCN_SAVEPOINTLEFT"
		Case 2004 
			Return "SCN_MODIFYATTEMPTRO"
		Case 2005 
			Return "SCN_KEY"
		Case 2006 
			Return "SCN_DOUBLECLICK"
		Case 2007 
			Return "SCN_UPDATEUI"
		Case 2008 
			Return "SCN_MODIFIED"
		Case 2009 
			Return "SCN_MACRORECORD"
		Case 2010 
			Return "SCN_MARGINCLICK"
		Case 2011 
			Return "SCN_NEEDSHOWN"
		Case 2013 
			Return "SCN_PAINTED"
		Case 2014 
			Return "SCN_USERLISTSELECTION"
		Case 2015 
			Return "SCN_URIDROPPED"
		Case 2016 
			Return "SCN_DWELLSTART"
		Case 2017 
			Return "SCN_DWELLEND"
		Case 2018 
			Return "SCN_ZOOM"
		Case 2019 
			Return "SCN_HOTSPOTCLICK"
		Case 2020 
			Return "SCN_HOTSPOTDOUBLECLICK"
		Case 2021 
			Return "SCN_CALLTIPCLICK"
		Case 2022 
			Return "SCN_AUTOCSELECTION"
		Case 2023 
			Return "SCN_INDICATORCLICK"
		Case 2024 
			Return "SCN_INDICATORRELEASE"
		Case 2025 
			Return "SCN_AUTOCCANCELLED"
		Case 2026 
			Return "SCN_AUTOCCHARDELETED"		
		Default
			Return "Unknown"
	End Select
End Function

Function EncodeColor:Int(ColorR:Byte, ColorG:Byte, ColorB:Byte)
	Return ColorR + (ColorG Shl 8) + (ColorB Shl 16)
End Function
